package ${ObjectMap.EM_PACKAGE}.${ObjectMap.OBJECT_CODE_CAMLE_CASE};

import com.ats.feeder.model.entities.${ObjectMap.ENTITY_FOLDER}.${ObjectMap.OBJECT_CODE_CAMLE_CASE};
import com.ats.feeder.model.exceptions.common.CreateEntityException;
import com.ats.feeder.model.exceptions.common.DeleteEntityException;
import com.ats.feeder.model.exceptions.common.UpdateEntityException;
import java.math.BigInteger;
import java.util.List;
import javax.ejb.Local;

/**
 *----------------------------------------------------------
 *----------------------------------------------------------
 * @author Mohammad Awwad
 * Version: v0.0
 * contact: mhmdawwad@gmail.com
 *-----------------------------------------------------------
 *-----------------------------------------------------------
 */
public interface ${ObjectMap.OBJECT_CODE_CAMLE_CASE}FacadeLocal {

 <#if ObjectMap.EM_HAS_INSERT ="true">
    ${ObjectMap.OBJECT_CODE_CAMLE_CASE} create(${ObjectMap.OBJECT_CODE_CAMLE_CASE} ${ObjectMap.OBJECT_CODE_BEAN_PATTERN}) throws CreateEntityException;
</#if>
 <#if ObjectMap.EM_HAS_UPDATE ="true">
    ${ObjectMap.OBJECT_CODE_CAMLE_CASE} edit(${ObjectMap.OBJECT_CODE_CAMLE_CASE} ${ObjectMap.OBJECT_CODE_BEAN_PATTERN}) throws UpdateEntityException;
</#if>
 <#if ObjectMap.EM_HAS_DELETE ="true">
    boolean remove(${ObjectMap.OBJECT_CODE_CAMLE_CASE} ${ObjectMap.OBJECT_CODE_BEAN_PATTERN}) throws DeleteEntityException;
</#if>

    ${ObjectMap.OBJECT_CODE_CAMLE_CASE} find(Object id);

    List<${ObjectMap.OBJECT_CODE_CAMLE_CASE}> findAll();

    List<${ObjectMap.OBJECT_CODE_CAMLE_CASE}> findRange(int[] range);

    int count();

<#assign argument = "">
<#assign i = 0>
<#list ObjectMap.attributesList   as  myList>
    <#if myList.FILTER_BY = "true">
        <#if myList.ATTRIBUTE_CODE_DATATYPE !="Other">
                   <#assign argument = argument + myList.ATTRIBUTE_CODE_DATATYPE>
        <#else>
                   <#assign argument = argument + myList.FIELD_DATA_TYPE>
        </#if>
                    <#assign argument = argument + " " + myList.ATTRIBUTE_CODE_BEAN_PATTERN>
                   <#if i+1 != attributesList?size><#assign argument = argument + ", "></#if>
    </#if>
<#assign i = i + 1>
</#list>
List<${ObjectMap.OBJECT_CODE_CAMLE_CASE}> find${ObjectMap.OBJECT_CODE_CAMLE_CASE}By(${argument});


}
